<?php
namespace app\admin\controller;

class Typelist extends Come{
    public function typelist(){
        $reslist=db('goods_type')->select();

      
        $this->assign('reslist',$reslist);
        return $this->fetch('typelist');

    }
    public function delete(){
        $delId=input('param.delId','','htmlspecialchars');
        $res=db('goods_type')->where('id',$delId)->delete();
        if($res>0){
            $this->success('删除成功!','admin/typelist/typelist');
        }else{
            $this->error('删除失败');
        }
    }
}